using System;
using System.Collections;
using SMS.SMPPClient.PDU;

namespace SMS.SMPPClient.PDU.Outgoing
{
    /// <summary>
    /// This class defines an ESME originated deliver_sm_resp.
    /// </summary>
    public class SMPPDeliverSMResponse : SMPPRequest
    {
        /// <summary>
        /// Creates a deliver_sm_resp PDU.
        /// </summary>
        /// <param name="commandStatus">The status of the command.</param>
        public SMPPDeliverSMResponse(uint commandStatus)
        {
            _CommandStatus = commandStatus;
            _CommandID = CommandIDType.deliver_sm_resp;
        }

        /// <summary>
        /// Creates the byte encoding for this PDU.
        /// </summary>
        public override System.Byte[] GetMSBHexEncoding()
        {
            ArrayList pdu = GetPDUHeader();

            //the message_id is unused and is always set to null
            pdu.Add((byte)0x00);

            return EncodePDUForTransmission(pdu);
        }
    }
}

